package org.jeecg.modules.power.mapper;

import java.util.List;

import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.jeecg.modules.power.entity.PowerSwitch;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

/**
 * @Description: 电源开关
 * @Author: jeecg-boot
 * @Date:   2024-03-25
 * @Version: V1.0
 */
public interface PowerSwitchMapper extends BaseMapper<PowerSwitch> {
    @Select("select count(*) from power_switch where del_flag = 0")
    public Integer getcnt();

    public IPage<PowerSwitch> getPage(@Param("page")IPage<PowerSwitch> page, @Param("powerSwitch") PowerSwitch powerSwitch);
    @Select("select id from power_switch where ddkid = #{ddkid} and del_flag = 0 limit 1")
    public String getId(@Param("ddkid") String ddkid);
}
